﻿using Firefly.Framework.Windows.ContentReaders;
using Firefly.Framework.Windows.Forms;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;

namespace Firefly.ContentPipeline.Windows.Forms
{
    [ContentTypeWriter]
    public class ButtonContentWriter : ContentTypeWriter<Button>
    {
        protected override void Write(ContentWriter output, Button value)
        {
            WriteButton(output, value);
        }

        public override string GetRuntimeReader(TargetPlatform targetPlatform)
        {
            return typeof(ButtonContentReader).AssemblyQualifiedName;
        }

        internal static void WriteButton(ContentWriter output, Button value)
        {
            ControlContentWriter.WriteComponent(output, value);
        }
    }
}
